package com.xsq.app.controller;

import com.xsq.app.model.Docker;
import com.xsq.app.service.DockerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Description TODO
 * @Author xsq
 * @Date 2021/1/22 16:59
 **/
@RestController
public class TestController {

    @Autowired
    private DockerImpl dockerImpl;

    @RequestMapping("/test")
    public String test() {
        return "测试成啦";
    }

    @RequestMapping("/add")
    public Docker add(@RequestParam String name) {
        return dockerImpl.add(name);
    }

    @RequestMapping("/get")
    public Docker get(@RequestParam Long id) {
        return dockerImpl.get(id);
    }
}
